package org.learn.intermediate.homework;

public class HomeWork09 {
    public static void main(String[] args) {
        String str = "abcdefghijklmnopqrstuvwxyz";
        String reverse = reverse(str, 0, 25);
        System.out.println(reverse);
    }
    public static String reverse(String str,int start,int end){
        char[] chars = str.toCharArray();
        //
        char temp = ' ';
        for (int i = start,j = end; i < j; i++,j--) {
            temp = chars[i];
            chars[i] = chars[j];
            chars[j] = temp;
        }
        return new String(chars);
    }

}
